import { appAxios } from '../hooks/request/index';
// 获取菜品分类
export function getDishCate(type) {
  return appAxios({ method: 'GET', url: '/category/list', params: { type } });
}
// 新增菜品分类
export function dishCategoryAdd(data) {
  return appAxios({ method: 'POST', url: '/dish/add', data: { ...data } });
}
// 查询单个菜品详情
export function dishCategoryQueryOne(id) {
  return appAxios({ method: 'GET', url: '/dish/query_one', params: { id } });
}
// 编辑菜品分类
export function dishCategoryEdit(data) {
  return appAxios({ method: 'POST', url: '/dish/edit', data: { ...data } });
}
// 删除单个菜品详情
export function dishCategoryDeleteOne(id) {
  return appAxios({ method: 'GET', url: '/dish/delOneorMore', params: { ids: id } });
}
// 修改状态

export function dishCategoryChangeState(data) {
  return appAxios({ method: 'GET', url: '/dish/isStatus', params: { ...data } });
}
